-
Notifications
You must be signed in to change notification settings - Fork 34
Feature/launch first match #425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new optional feature that automatically launches the first matching app when using the LAUNCH command, eliminating the need to manually select from suggestions. The feature is disabled by default and can be toggled in the Settings.
- Added a new Settings toggle for auto-launching the first matching app with the LAUNCH command
- Refactored launch suggestion logic into a reusable function that returns structured data
- Fixed a typo in the Italian translation file that was causing build issues
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
app/src/main/res/values/strings.xml | Added new string resource for the feature toggle |
app/src/main/res/values-*/strings.xml | Added translations for the new feature in multiple languages |
app/src/main/res/layout/activity_settings.xml | Added UI switch for the new feature in Settings |
app/src/main/java/com/coderGtm/yantra/terminal/Helper.kt | Extracted launch suggestions logic into reusable function |
app/src/main/java/com/coderGtm/yantra/commands/launch/Helper.kt | Added helper function to find first matching app |
app/src/main/java/com/coderGtm/yantra/commands/launch/Command.kt | Implemented auto-launch functionality in LAUNCH command |
app/src/main/java/com/coderGtm/yantra/activities/SettingsActivity.kt | Added settings management for the new feature |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…into feature/launch-first-match # Conflicts: # app/src/main/res/values-es/strings.xml # app/src/main/res/values-it/strings.xml # app/src/main/res/values-ru/strings.xml # app/src/main/res/values-sr/strings.xml # app/src/main/res/values-uk/strings.xml
Are there any additional changes you'd like me to implement here @coderGtm? |
Sorry @sebastinto but I haven't been able to take a proper look at it yet. Once I have a good look at it, I'll ping you here. |
Summary
This PR adds a new optional feature that allows users to automatically launch the first matching app in the suggestions result when using the
LAUNCH
command, eliminating the need to manually select from suggestions.Changes
Primary
getLaunchSuggestions()
function that returns aLaunchSuggestionsResult
data class for consistencyLAUNCH
command to support the new featureSecondary
Testing
LAUNCH c
-> press the keyboard return key -> first match is launched (in this case the "Contacts" app)LAUNCH c
-> press the keyboard return key -> error message displayed'c' app not found. Try using 'list apps' to get list of all app names.